var express = require('express');
var app = express();
var data = ""
app.use("/public", express.static("public"))
    //get请求
app.get('/', function(req, res) {
        console.log("GET");

        res.send('Hello World,GET');

    })
    //post请求
app.post("/", function(req, res) {
        console.log("POST");

        res.send("Hello World POST")
    })
    //get请求/get页面
app.get("/get", function(req, res) {
        console.log("/del_user 响应 DELETE 请求");
        res.send("页面丢失！")
    })
    //用户列表
app.get("/list", function(req, res) {
        console.log("/list_user GET 请求");
        res.send("用户列表")
    })
    //以ab开头，cd结尾的页面
app.get("/ab*cd", function(req, res) {
    console.log("/ab*cd GET 请求");
    res.send("以ab开头，cd结尾的页面")
})
var server = app.listen(8080, function() {
    var home = hostname = 'http://localhost';
    var host = server.address().address
    var port = server.address().port

    console.log("应用实例，访问地址为  " + home + ":" + port);

})
console.log(data);